import request from '@/utils/request'

const review = {
  // 新增评审组
  teamAdd(data) {
    return request.post(`/ggxq/reviewTeam/add`, data);
  },
  // 修改评审组
  teamUpdate(data) {
    return request.post(`/ggxq/reviewTeam/update`, data);
  },
  // 删除评审组
  teamDel(id) {
    return request.post(`/ggxq/reviewTeam/delete/${id}`);
  },
  // 获取评审组
  teamGet(id) {
    return request.get(`/ggxq/reviewTeam/detail/${id}`);
  },
  // 评审组树状列表
  teamTree(params) {
    return request.get('/ggxq/reviewTeam/tree', {params});
  },
  teamList(params) {
    return request.get('/ggxq/reviewTeam/list', {params});
  },
  // 根据评审组id获取该分组下所有项目
  teamProjectGet(id) {
    return request.get(`/ggxq/projectReviewTeam/getByTeamId/${id}`);
  },
  // 根据评审组id获取该分组下所有专家
  teamExpertGet(id) {
    return request.get(`/ggxq/expertsReviewTeam/getByTeamId/${id}`);
  },
  teamProjectListByReviewType(params) {
    return request.get(`/ggxq/specialPlan/getSpecialPlanList`, {params})
  },
  // 评审组绑定多个项目
  teamProjectAddList(data) {
    return request.post('/ggxq/projectReviewTeam/addList', data)
  },
  // 删除项目与评审组绑定关系
  teamProjectDel(id) {
    return request.post(`/ggxq/projectReviewTeam/delete/${id}`);
  },
  // 删除专家与评审组绑定关系
  teamExpertDel(id) {
    return request.post(`/ggxq/expertsReviewTeam/delete/${id}`)
  },
  // 设置评审组专家组长
  setTeamLeader(data) {
    return request.post(`/ggxq/expertsReviewTeam/setTeamLeader`, data);
  },
  // 查询专家列表
  teamExpertList(params) {
    return request.get('/ggxq/expertsReviewTeam/expertsList', {params})
  },
  // 新增多个专家与评审组绑定
  teamExpertAddList(data) {
    return request.post('/ggxq/expertsReviewTeam/addList', data)
  },
  getExpertByIds(ids) {
    return request.post(`/ggxq/expertsReviewTeam/getExpertByIds`, ids);
  },
  teamExpertAddListConfirm(data){
    return request.post('/ggxq/expertsReviewTeam/addListNotVerify', data)
  },
  projectExpertsInfoByReviewTypeForReview(params) {
    return request.get(`/ggxq/projectExpertsInfo/getByReviewTypeForReview`, {
      params
    })
  },
  zjSignPdf(data) {
    return request.post(`/ggxq/projectExpertsInfo/zjSignPdf`, data);
  },
  // 组专家评审详情
  teamExpertsInfoGet(id) {
    return request.get(`/ggxq/projectExpertsInfo/detail/${id}`);
  },
  // 添加专家评审信息
  teamExpertsInfoUpdate(data) {
    return request.post(`/ggxq/projectExpertsInfo/update`, data);
  },
  projectReviewTeamGetByBusinessIdAndReviewType(params) {
    return request.get(`/ggxq/projectReviewTeam/getByBusinessIdAndReviewType`, {
      params
    })
  },
  projectReviewTeamGet(id) {
    return request.get(`/ggxq/projectReviewTeam/detail/${id}`);
  },
  teamProjectReviewUpdate(data){
    return request.post(`/ggxq/projectReviewTeam/update`, data);
  },
  // 生成
  sendMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/ggxq/expertsReviewTeam/sendMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  createMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/ggxq/expertsReviewTeam/createMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  // 获取专家在本评审组已经推荐了几个项目
  getRecommendCount(params) {
    return request.get(`/ggxq/projectExpertsInfo/getRecommendCount`,{params});
  },
}
export default review;
